package bean;

import java.sql.Connection;
import java.sql.DriverManager;

public class MyOracle {
	Connection conn;

	public MyOracle() {
		String driver = "oracle.jdbc.driver.OracleDriver";
		String url="jdbc:oracle:thin:@127.0.0.1:1521:xe";
		String id= "hr";
		String pw="hr";

		try{
			Class.forName(driver);
			System.out.println("드라이버가 로딩되었습니다.");

			conn = DriverManager.getConnection(url, id, pw);
			System.out.println("Connection이 생성 되었습니다.");

		}
		catch(Exception ex){
			ex.printStackTrace();
		}
	}
	public Connection getConn(){
		return conn;
	}

}
